<?php

/**

 * @Author: user

 * @Date:   2018-11-07 09:41:58

 * @Last Modified by:   user

 * @Last Modified time: 2018-11-07 10:55:04

 */

namespace app\common\behavior;

use app\common\lib\user_operate\ModuleOperate;

/**

 * 跨域请求  行为  绑定在app/tags.php  中

 */

class PluginUndateHook
{

    public function run(&$params)
    {

        $info = $params['info'];

        //更新菜单操作

        $MO = new ModuleOperate;

        $res = $MO->update($info['name'], $info['store'], $info['code']);

        if ($res['status'] != 'success') {

            $params['return'] = $res['message'];

        } else {

            $params['return'] = true;

        }

    }

}
